Skip to content

System default dark mode#92

Open
kumaradityaraj wants to merge 17 commits intoserverlessworkflow:mainfrom
kumaradityaraj:darkMode
Open

System default dark mode#92
kumaradityaraj wants to merge 17 commits intoserverlessworkflow:mainfrom
kumaradityaraj:darkMode

Conversation

@kumaradityaraj
Copy link
Copy Markdown
Contributor

Closes Add support for dark and light theme

This feature implements dark mode by using system current status.

Screen.Recording.2026-04-15.at.2.27.00.PM.mov

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings April 15, 2026 08:59
@kumaradityaraj kumaradityaraj requested review from fantonangeli, handreyrc and lornakelly and removed request for Copilot and handreyrc April 15, 2026 09:02
@lornakelly
Copy link
Copy Markdown
Contributor

lornakelly commented Apr 15, 2026

@kumaradityaraj Thanks for the PR. Looks like this only handles the first part of ticket for system default but the second part needs to be done "implement an attribute in the component to override this behaviour and force a specific theme"

Comment thread packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx Outdated
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings April 15, 2026 13:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements theme switching for the diagram editor by wiring React Flow’s colorMode to a new state (defaulting to system), and removes the previous hardcoded diagram background styling.

Changes:

  • Add colorMode="system" support to @xyflow/react ReactFlow via component state.
  • Add a UI <select> to manually switch between dark, light, and system.
  • Remove .diagram-background styling from the diagram CSS; add a test-run artifact file.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx Adds colorMode state, passes it to ReactFlow, and introduces a theme dropdown UI.
packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.css Removes background styling previously applied via .diagram-background.
packages/serverless-workflow-diagram-editor/test-results/.last-run.json Adds last test run result artifact.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx Outdated
Comment thread packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx Outdated
Comment thread packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx Outdated
Comment thread packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx Outdated
Comment thread packages/serverless-workflow-diagram-editor/test-results/.last-run.json Outdated
@kumaradityaraj
Copy link
Copy Markdown
Contributor Author

@fantonangeli implement an attribute in the component to override this behaviour and force a specific theme by this you mean adding a side button for selecting modes or is it something copilot is suggesting here

@fantonangeli
Copy link
Copy Markdown
Member

@kumaradityaraj I was thinking about:

  • adding a property here:
    packages/serverless-workflow-diagram-editor/src/diagram-editor/DiagramEditor.tsx:29
  • received from:
    packages/serverless-workflow-diagram-editor/stories/DiagramEditor.tsx:26
  • and finally passing it to Reactflow like you already did here:
    packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx:96

Comment thread packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx Outdated
Comment thread packages/serverless-workflow-diagram-editor/test-results/.last-run.json Outdated
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings April 21, 2026 07:26
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx Outdated
Comment thread packages/serverless-workflow-diagram-editor/src/diagram-editor/DiagramEditor.tsx Outdated
kumaradityaraj and others added 3 commits April 21, 2026 13:12
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Copilot AI review requested due to automatic review settings April 21, 2026 09:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/serverless-workflow-diagram-editor/src/types/colorMode.ts
kumaradityaraj and others added 3 commits April 22, 2026 14:21
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
…css-classes

Implement colorMode css classes
Copilot AI review requested due to automatic review settings April 22, 2026 11:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

packages/serverless-workflow-diagram-editor/src/diagram-editor/DiagramEditor.tsx:63

  • DiagramEditor uses props.ref with useImperativeHandle, but ref is not passed as a normal prop to function components unless the component is wrapped with React.forwardRef. As-is, the imperative handle will never be exposed to consumers. Convert DiagramEditor to forwardRef (remove ref from DiagramEditorProps) and use the forwarded ref in useImperativeHandle.
  // Allow imperatively controlling the Editor
  React.useImperativeHandle(
    props.ref,
    () => ({
      doSomething: () => {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/serverless-workflow-diagram-editor/src/diagram-editor/DiagramEditor.tsx Outdated
Comment thread packages/serverless-workflow-diagram-editor/src/diagram-editor/DiagramEditor.tsx Outdated
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings April 22, 2026 13:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copilot AI review requested due to automatic review settings April 23, 2026 08:09
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kumaradityaraj
Copy link
Copy Markdown
Contributor Author

@fantonangeli @lornakelly Its ready for final review.

Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Copy link
Copy Markdown
Contributor

@lornakelly lornakelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@fantonangeli fantonangeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @kumaradityaraj

@kumaradityaraj
Copy link
Copy Markdown
Contributor Author

@ricardozanini Please review and merge this PR. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for dark and light theme

4 participants